From: Jonas Dreßler Date: Fri, 22 Nov 2019 19:56:30 +0000 (+0100) Subject: switcherPopup: Use roundtrip time when the popup is modifier-less X-Git-Tag: archive/raspbian/50.5-1+rpi1~1^2~781^2^2~387 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=998fe58482f84d4509b275efb8a4144a52440668;p=gnome-shell.git switcherPopup: Use roundtrip time when the popup is modifier-less The noModsTimeout obviously finishes inside a timeout callback, which means `global.get_current_time()` might return Clutter.CURRENT_TIME (ie. 0) when called inside it, because it's not called while handling an event. This means when switching apps or activating a window, the timestamp passed to `activate_window` may be 0, which is the reason why the altTab switcher is currently broken when using modifier-less keybindings. Fix that by using `meta_display_get_current_time_roundtrip`, which always return a valid timestamp, instead of `shell_global_get_current_time`. https://gitlab.gnome.org/GNOME/gnome-shell/merge_requests/847 --- diff --git a/js/ui/switcherPopup.js b/js/ui/switcherPopup.js index 44228ec1b..fc982781f 100644 --- a/js/ui/switcherPopup.js +++ b/js/ui/switcherPopup.js @@ -277,7 +277,7 @@ var SwitcherPopup = GObject.registerClass({ GLib.PRIORITY_DEFAULT, NO_MODS_TIMEOUT, () => { - this._finish(global.get_current_time()); + this._finish(global.display.get_current_time_roundtrip()); this._noModsTimeoutId = 0; return GLib.SOURCE_REMOVE; });